<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        window.addEventListener('load', function () {
            var img = document.querySelector('img')
            // 我采取一个调用函数名的方式的定时器
            function gb() {
                img.style.display = 'none'
            }
            setTimeout(gb, 5000)
        })
    </script>
    <img src="../01-Dom-标准接口/4-操作元素/image/gr.gif" alt="">

</body>

</html>